home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / FILE-TD.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  55 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   FILE-TD .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB01.INC"
  22. $INCLUDE "DAS-NB02.INC"
  23. COLOR 7, 0
  24. CLS
  25.  
  26. ? "┌────────────────────────────────────────────────────────────────────────
  27. ? "│ SetTimeDate ( FileName$, Tyme$, Dyte$ )
  28. ? "├────────────────────────────────────────────────────────────────────────
  29. ? "│ Sometimes it is necessary or desirable to change a file's date and/or
  30. ? "│ time stamp. This sub will allow you to do either or both quite easily
  31. ? "│ and uses the time/date format(s) you have set-up for your program.
  32. ? "│
  33. ? "│ One handy place to use this type routine is with data files. You can
  34. ? "│ set the time/date then use that info to tell when the file was last
  35. ? "│ accessed, written to, etc. I use it to set the date and time on the
  36. ? "│ files in this library so I can tell which version (time) I've got and
  37. ? "│ the date of last access, etc.
  38. ? "└────────────────────────────────────────────────────────────────────────
  39. ?
  40.                                             '┌──────────────────────────────
  41. FileName$ = "DUMMY.DAT"                     '│ our test file
  42. OPEN "B", #1, FileName$                     '│ open it
  43.   PUT$ #1, "THIS IS JUNK"                   '│  write some junk to it
  44. CLOSE                                       '│ close it
  45.                                             '│
  46. F$ = fDIR$( FileName$, 255, 255 )           '│ display original file specs
  47. PRINT "THE ORIGINAL DATA: "; F$             '│ 255=&b11111111 for everything
  48.                                             '│
  49. SetTimeDate FileName$, "12:12", "01-01-99"  '│ change them
  50.                                             '│
  51. F$ = fDIR$( FileName$, 255, 255 )           '│ display the new settings
  52. PRINT "THE CHANGED  DATA: "; F$             '│
  53.                                             '│
  54. KILL FileName$                              '│ kill it as we don't need it
  55.                                             '└───────────────────────────────